<?php
header('Access-Control-Allow-Origin:*');
header('Access-Control-Allow-Headers:x-requested-with,content-type');
header("Content-type: application/json; charset=utf-8");
$method =$_SERVER['REQUEST_METHOD'];
//echo $method;
if($method==='GET'){
    $data = $_GET;
}
else if($method==='POST'){

if(strpos($_SERVER['CONTENT_TYPE'],'multipart/form-data') == false){
    $data = json_decode(file_get_contents('php://input'),true);
}
else{
    $data=$_FILES['file'];
    }
}
$_option=$data['_option'];
switch($_option){
    case 1000:require_once './1000.php';break;
    case 1001:require_once './1001.php';break;
    case 1002:require_once './1002.php';break;
    case 1003:require_once './1003.php';break;
    case 1013:require_once './1013.php';break;
    case 1004:require_once './1004.php';break;
    case 1014:require_once './1014.php';break;
    case 1024:require_once './1024.php';break;
    case 1005:require_once './1005.php';break;
    case 1015:require_once './1015.php';break;
    case 1016:require_once './1016.php';break;
    case 1017:require_once './1017.php';break;
    case 2000:require_once './2000.php';break;
    case 2001:require_once './2001.php';break;
    case 2006:require_once './2006.php';break;
    case 2016:require_once './2016.php';break;
    case 2017:require_once './2017.php';break;
    default:echo 'false';break;
}
?>